ViewService.showDialog Method

Shows a dialog. The level of the dialog is auto-determined by how many dialogs are already shown (if auto close is disabled). Since this show method will close any previous cloned dialogs, all event tying should be done after this method is called.
 

Parameters

contents

Type: jQuery or HTMLElement or String
The jQuery element, DOM element, or HTML content for the dialog. If a DOM or jQuery element is provided, it will be removed from the DOM and placed in the dialog. When the dialog is closed, it will be hidden and re-added to the templates container.
dialogOptions

Type: Object
(optional) An object specifying the options for this dialog. Example: { buttons: dundas.view.DialogButtons.OK_CANCEL, submit: function () { this.close(); }, cancel: function () { this.close(); }, help: function () {} help callback method disableAutoClose: false, normally all dialogs will be closed when a new one is shown. This may not be desired when dialogs want to stack. isDoubleWidthDialog: false, normally a dialog shows as 1 space. A double width dialog gets twice the width as usual. isHelpButtonShown: false, whether or not the help button is shown. validateOptions: { onfocusout: false, onkeyup: false, rules: .., messages: .. } isConfirmBeforeCancelRequired: null, optional. if specified, this will take precedent over the normal default value calculated based on the buttons available. }
Optional: True

Return Value


Type: DialogInfo
The dialog info for the created dialog. This can be used to close it at a later time, or track whether or not it was displayed. 

Examples